function ajax(ajaxOption) {
	var method,url,data,async,success;
	var xhr=null;
	url=ajaxOption.url;
	url2=ajaxOption.url2;
	data2=ajaxOption.data2;
	if(window.XMLHttpRequest){
		xhr= new XMLHttpRequest();
	}else{
		xhr=new ActiveXObject("Microsoft.XMLHttp");
	}

	if(ajaxOption.method ==undefined){
		method='get';
	}else{
		method=ajaxOption.method;
	}

	if(ajaxOption.url== undefined){
		throw new Error("url cannot be null");
	}
	

	if(ajaxOption.data==undefined){
		data=ajaxOption.data="";
	}else{
		data=ajaxOption.data;
	}

	if(method=='get'&& data){
		url +=data;
	}



	if(ajaxOption.async==undefined){
		async=true;
	}else{
		async=ajaxOption.async;
	}

	success=ajaxOption.success;

	xhr.open(method,url,async);

	if(method=='get'){
		xhr.send();
	}else{
		xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');
		xhr.send(url+data+url2+data2);
	}



	xhr.onreadystatechange=function(){
		if(xhr.readyState==4){
			if(xhr.readyState==4){
				if(xhr.status==200){
					success&&success(xhr.responseText);
				}else{
					alert(xhr.status)
				}
			}
		}
	}
}